package com.evil.application.api;

import com.evil.application.config.FeignErrorDecoder;
import com.evil.application.pojo.dto.queue.MyQueueReqDTO;
import com.evil.application.pojo.dto.queue.QueueRespDTO;
import com.evil.common.core.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 应用队列
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@FeignClient(name = ServiceNameConstant.APPLICATION_SERVICE, configuration = {FeignErrorDecoder.class})
public interface RemoteApplicationQueueService {

    /**
     * 我的队列
     *
     * @param myQueueReqDTO myQueueReqDTO
     * @return List
     */
    @PostMapping("/remote/application/my-queue")
    List<QueueRespDTO> myQueue(@Validated @RequestBody MyQueueReqDTO myQueueReqDTO);
}
